// 项目管理
<template>
  <div class="project_admin">
    <!-- =========== -->
    <el-button type="primary" class="project_add" @click="addProject">新增项目</el-button>
    <!-- =========== -->
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="进行中" name="doing">
        <div class="doing_project_content">
          <el-row>
            <el-col :span="8" v-for="(o, index) in 2" :key="o" :offset="index > 0 ? 2 : 0">
              <projectCard></projectCard>
            </el-col>
          </el-row>
        </div>
        <!-- =========== -->
        <!-- 分页 -->
      </el-tab-pane>
      <!-- =========== -->
      <el-tab-pane label="已完成" name="done">
        <div class="done_project_content">
          <el-row>
            <el-col :span="8" v-for="(o, index) in 2" :key="o" :offset="index > 0 ? 2 : 0">
              <projectCard></projectCard>
            </el-col>
          </el-row>
        </div>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import projectCard from "../../../components/project/admin/projectCard";
export default {
  name: "projectAdmin",
  components: {
    projectCard
  },
  data () {
    return {
      activeName: "doing"
    };
  },
  methods: {
    handleClick (tab, event) {
      console.log(tab, event);
    },
    addProject () {
      this.$router.push("/project/admin/projectTodo");
    }
  }
};
</script>

<style src="../../../style/project/admin.css">
</style>

<style>
</style>